/*
 * @Description: 利用审批 - 审批列表 操作组件
 * @Author: Rfan
 * @Date: 2022-03-22 14:48:08
 * @LastEditTime: 2022-03-23 18:50:31
 */

import { Button, Divider, Space } from 'antd';
import BorrowApplyDialog from '../dialogs/BorrowApplyDialog';
import NotifyDialog from '../dialogs/Notify';

const BorrowOperate = () => {
  /**
   * @description: 打开通知弹窗方法
   */
  const showNotifyDialog = () => {
    NotifyDialog({
      onOk: (val: any) => {
        console.log('onOk：', val);
      }
    });
  };

  /**
   * @description: 打开借阅申请弹窗方法
   */
  const showBorrowDialog = () => {
    BorrowApplyDialog({
      onOk: (val: any) => {
        console.log('onOk：', val);
      }
    });
  };
  return (
    <div className="filter-container">
      <p className="page-title">审批列表</p>
      <Space size="small">
        <Button onClick={showNotifyDialog}>借阅通知</Button>
        <Divider type="vertical" />
        <Button onClick={showBorrowDialog}>直接登记接借阅申请</Button>
        <Button disabled>借阅登记</Button>
        <Button disabled>归还</Button>
        <Button disabled>催还</Button>
        <Button disabled>续借</Button>
        <Button disabled>异常处理</Button>
        <Divider type="vertical" />
        <Button disabled>筛选/检索</Button>
      </Space>
    </div>
  );
};

export default BorrowOperate;
